package com.dingshi.security.entity;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.dingshi.security.R;

public class LabiEditText extends LinearLayout {
	// protected TextView tv;
	protected TextView et;
	protected TextView sp;
	protected Context context;
	protected Button ib;
	protected Object object;
	protected int type = -1;

	public LabiEditText(Context context) {
		super(context);
		// 导入布局
		this.context = context;
		LayoutInflater.from(context).inflate(R.layout.labiedittext, this, true);
		et = (TextView) findViewById(R.id.labiEditText_editarea);
		sp = (TextView) findViewById(R.id.labiEditText_Spinner);
		ib = (Button) findViewById(R.id.labiEditText_delete);
	}

	public LabiEditText(Context context, AttributeSet attrs) {
		super(context, attrs);
		// 导入布局
		this.context = context;
		LayoutInflater.from(context).inflate(R.layout.labiedittext, this, true);
		et = (EditText) findViewById(R.id.labiEditText_editarea);
		sp = (TextView) findViewById(R.id.labiEditText_Spinner);
		ib = (Button) findViewById(R.id.labiEditText_delete);
	}

	public String getText() {
		return et.getText().toString();
	}

	public void setText(String text) {
		et.setText(text);
	}

	public void setNumber(String text) {
		sp.setText(text);
	}

	public void setOnClickListener(OnClickListener l) {
		ib.setOnClickListener(l);
	}

}
